<div class="topic">
  <header class="topic-header">
    <div class="topic-header-wrap">
      <div class="topic-header-avatar">
        <%= SharedHelpers.lazy_image(icon_url(@source), "#{@source.name} Icon", width: 80, height: 80) %>
      </div>

      <h2 class="topic-header-title"><%= @source.name %></h2>

      <div class="topic-header-description">
        <%= @source.description %>
        <%= admin_edit_link(@conn, @current_user, @source) %>
      </div>

      <div class="topic-header-meta">
        <%= if @source.website do %>
          <%= link(SharedHelpers.domain_name(@source.website), to: @source.website) %>
        <% end %>
        &bull;
        <%= SharedHelpers.pluralize(news_count(@source), "Story", "Stories") %>
      </div>
    </div>

    <%= link "All Sources", to: Routes.news_source_path(@conn, :index), title: "View All Sources", class: "topic-header-back" %>
  </header>

  <a id="feed" class="anchor"></a>
  <div class="feed">
  <%= for item <- @items do %>
    <%= render(NewsItemView, "_summary.html", Map.merge(assigns, %{item: item, style: "date"})) %>
  <% end %>
  <%= render(SharedView, "_more_button.html", assigns) %>
  </div>
</div>
